# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>

pkgname=meld
pkgver=3.16.4
pkgrel=1
pkgdesc='Visual diff and merge tool'
url='http://meldmerge.org/'
license=(GPL)
arch=(any)
depends=(python2-gobject python2-cairo gtksourceview3 gsettings-desktop-schemas dconf)
makedepends=(intltool itstool git)
optdepends=('python2-dbus: open a new tab in an already running instance')
_commit=47f9fe6465371f26059c0a87040bfcfd251fb4bf  # tags/3.16.4^0
source=("git+https://git.gnome.org/browse/meld#commit=$_commit")
sha1sums=('SKIP')

# Meld does not support Python 3. The build succeeds, but
# the main executable checks the version and errors out.

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  cd $pkgname
  python2 setup.py build
}

package() {
  cd $pkgname
  # using --skip-build breaks install
  python2 setup.py --no-update-icon-cache --no-compile-schemas \
    install --prefix=/usr --root="$pkgdir" --optimize=1
}
